<%-- 
    Document   : prodMgrHomePage
    Created on : Feb 24, 2012, 11:09:15 PM
    Author     : Hiroroi
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
          <%

        String username = (String)session.getAttribute("username");
        String userType = (String)session.getAttribute("userType");
        
        if((String)session.getAttribute("username")== null)
            {
            response.sendRedirect("home.jsp");
            }
        else if((String)session.getAttribute("userType")== "3")
            {
            response.sendRedirect("acctMgrHomePage.jsp");
            }
        else if((String)session.getAttribute("userType")== "1")
            {
            response.sendRedirect("adminIndex.jsp");
            }
        else if((String)session.getAttribute("userType")== "4")
            {
            response.sendRedirect("userHomePage.jsp");
            }
        else{
        
        out.print("Hello ");
        out.print(username);
        }
        %>
    <center>
        
        <form name="form1" method="post" action="addBook.jsp">
            <br> <input type="submit" name="addBook" value="Add Books"/>          
        </form>
        
        <form name="form2" method="post" action="addMag.jsp">
            <br> <input type="submit" name="addMag" value="Add Magazines"/>          
        </form>
        
        <form name="form3" method="post" action="addCd.jsp">
            <br> <input type="submit" name="addCd" value="Add Audio CDs"/>          
        </form>
        
        <form name="form4" method="post" action="addDvd.jsp">
            <br> <input type="submit" name="addDvd" value="Add Dvds"/>          
        </form>
        <a style="color:black"class="a" href="Logout.jsp">LOG OUT</a>
    </center>
    </body>
</html>
